io/ring.h: drop unused and broken *_RING_ATTACH() macros
authorJan Beulich <jbeulich@suse.com>
Wed, 12 Jun 2013 08:07:48 +0000 (10:07 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 12 Jun 2013 08:07:48 +0000 (10:07 +0200)
Initializing r*_prod_pvt and r*_cons from independent shared ring
fields is broken, as other macros in this header rely on them being
coupled. Furthermore using the backend variant would also imply a
security vulnerability.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/include/public/io/ring.h

index bdfb998cec2f1ab2f9c22361bcac6cfdf8972c35..73e13d7ae432bbdb48d63be0f8d1e6fb518470f2 100644 (file)
@@ -174,21 +174,6 @@ typedef struct __name##_back_ring __name##_back_ring_t
     (_r)->sring = (_s);                                                 \
 } while (0)
 
-/* Initialize to existing shared indexes -- for recovery */
-#define FRONT_RING_ATTACH(_r, _s, __size) do {                          \
-    (_r)->sring = (_s);                                                 \
-    (_r)->req_prod_pvt = (_s)->req_prod;                                \
-    (_r)->rsp_cons = (_s)->rsp_prod;                                    \
-    (_r)->nr_ents = __RING_SIZE(_s, __size);                            \
-} while (0)
-
-#define BACK_RING_ATTACH(_r, _s, __size) do {                           \
-    (_r)->sring = (_s);                                                 \
-    (_r)->rsp_prod_pvt = (_s)->rsp_prod;                                \
-    (_r)->req_cons = (_s)->req_prod;                                    \
-    (_r)->nr_ents = __RING_SIZE(_s, __size);                            \
-} while (0)
-
 /* How big is this ring? */
 #define RING_SIZE(_r)                                                   \
     ((_r)->nr_ents)